//
//  ShopCollectionCell.m
//  FKGW
//
//  Created by song ce on 2017/2/16.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "ShopCollectionCell.h"
#import "OSSHelper.h"
@implementation ShopCollectionCell

- (void)awakeFromNib {
    [super awakeFromNib];

}


-(void)setModel:(ShopCellModel *)model{
    _model = model;
    self.marketNameLabel.text = _model.marketName;
    NSString *objectKey = _model.marketPics;
    
//    if(!objectKey.length||![objectKey containsString:@"."]){
//        self.iconImageV.image = [UIImage imageNamed:@"sy_shangchang_msg"];
//        return;
//    }
    self.iconImageV.image = [UIImage imageNamed:@"sy_shangchang_msg"];
    [[OSSHelper sharedHelper]OSSDownLoadWithObjectKey:objectKey xOssProcess:[NSString stringWithFormat:@"image/resize,m_fill,w_%d,h_%d",130,192]  downLoadBlock:^(NSData *data) {
        dispatch_async(dispatch_get_main_queue(), ^{
            self.iconImageV.image= [UIImage imageWithData:data];
        });
    }];
  }

@end
